package com.fishery.processing.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;

import com.fishery.processing.util.Unchangeable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotEmpty;

/**
 * <p>
 * 
 * </p>
 *
 * @author ${author}
 * @since 2021-01-14
 */
@ApiModel(value="factory对象", description="加工厂信息表")
@TableName(value = "t_processing_factory_info")
public class Factory implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "加工厂编号")
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "厂家名称")
    @NotEmpty(message = "厂家名称不能为空")
    private String processingFactoryName;

    @ApiModelProperty(value = "厂家地址")
    @NotEmpty(message = "厂家地址不能为空")
    private String processingFactoryAddress;

    @ApiModelProperty(value = "厂家地址经度")
    private String processingFactoryPositionLongitude;

    @ApiModelProperty(value = "厂家地址纬度")
    private String processingFactoryPositionLatitude;

    @ApiModelProperty(value = "创建者id")
    @NotEmpty(message = "创建者id不能为空")
    @Unchangeable
    private String createPersonId;

    @ApiModelProperty(value = "主营加工品类")
    private String processingType;

    @ApiModelProperty(value = "加工厂占地面积（平方米）")
    private Integer processingFactoryArea;

    @ApiModelProperty(value = "基地id")
    @NotEmpty(message = "基地id不能为空")
    @Unchangeable
    private String baseId;

    @ApiModelProperty(value = "乐观锁")
    @Version
    @TableField(fill = FieldFill.INSERT)
    private Integer version;

    @ApiModelProperty(value = "逻辑删除")
    @Unchangeable
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer isDeleted;

    @ApiModelProperty(value = "创建时间")
    @Unchangeable
    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getProcessingFactoryName() {
        return processingFactoryName;
    }

    public void setProcessingFactoryName(String processingFactoryName) {
        this.processingFactoryName = processingFactoryName;
    }

    public String getProcessingFactoryAddress() {
        return processingFactoryAddress;
    }

    public void setProcessingFactoryAddress(String processingFactoryAddress) {
        this.processingFactoryAddress = processingFactoryAddress;
    }

    public String getProcessingFactoryPositionLongitude() {
        return processingFactoryPositionLongitude;
    }

    public void setProcessingFactoryPositionLongitude(String processingFactoryPositionLongitude) {
        this.processingFactoryPositionLongitude = processingFactoryPositionLongitude;
    }

    public String getProcessingFactoryPositionLatitude() {
        return processingFactoryPositionLatitude;
    }

    public void setProcessingFactoryPositionLatitude(String processingFactoryPositionLatitude) {
        this.processingFactoryPositionLatitude = processingFactoryPositionLatitude;
    }

    public String getCreatePersonId() {
        return createPersonId;
    }

    public void setCreatePersonId(String createPersonId) {
        this.createPersonId = createPersonId;
    }

    public String getBaseId() {
        return baseId;
    }

    public void setBaseId(String baseId) {
        this.baseId = baseId;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    public String getProcessingType() {
        return processingType;
    }

    public void setProcessingType(String processingType) {
        this.processingType = processingType;
    }

    public Integer getProcessingFactoryArea() {
        return processingFactoryArea;
    }

    public void setProcessingFactoryArea(Integer processingFactoryArea) {
        this.processingFactoryArea = processingFactoryArea;
    }

    @Override
    public String toString() {
        return "Factory{" +
                "id='" + id + '\'' +
                ", processingFactoryName='" + processingFactoryName + '\'' +
                ", processingFactoryAddress='" + processingFactoryAddress + '\'' +
                ", processingFactoryPositionLongitude='" + processingFactoryPositionLongitude + '\'' +
                ", processingFactoryPositionLatitude='" + processingFactoryPositionLatitude + '\'' +
                ", createPersonId='" + createPersonId + '\'' +
                ", processingType='" + processingType + '\'' +
                ", processingFactoryArea=" + processingFactoryArea +
                ", baseId='" + baseId + '\'' +
                ", version=" + version +
                ", isDeleted=" + isDeleted +
                ", gmtCreate=" + gmtCreate +
                ", gmtModified=" + gmtModified +
                '}';
    }
}
